<template>
  <div class="app">
    <router-view :key="Date.now()"></router-view>
    <van-tabbar v-model="active" v-if="$route.meta.showTab">
      <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item>
      <van-tabbar-item icon="search" dot to="/find">搜索</van-tabbar-item>
      <van-tabbar-item icon="friends-o" badge="20">用户</van-tabbar-item>
      <van-tabbar-item icon="setting-o" badge="5" to="/user"
        >设置</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style></style>
